package com.qd.common.panda.domain.entity.rule;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * 分时段混合计费，如“白天（8点至24点），前两小时5元，以后每小时3元，夜间（24点至8点），每次5元”
 * [{
 * "start": "00:00:00",
 * "end": "08:00:00",
 * "everyTimePrice": 500
 * }, {
 * "start": "08:00:00",
 * "end": "23:59:59",
 * "startHour": 2,
 * "startPrice": 500,
 * "price": 300
 * }]
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class Rule6DTO extends Rule4DTO {
    private Integer startHour;
    private BigDecimal startPrice;
    private BigDecimal everyTimePrice;

    @Override
    public void freeData() {
        this.startHour = null;
        this.startPrice = null;
        this.everyTimePrice = null;
        super.freeData();
    }
}